package model
{
  import flash.display.DisplayObject;
  import flash.events.EventDispatcher;
  import flash.events.IEventDispatcher;
  
  import model.proxys.CardProxy;
  
  import mx.collections.ArrayCollection;
  import mx.managers.PopUpManager;
  
  import view.popups.ItemInfo;

  public class MyPopUpManager extends EventDispatcher
  {
    [Bindable]
    public var currentItemInfoProxy:CardProxy;
    
    [Bindable]
    public var oParent:DisplayObject;
    
    private var _aItemList:ArrayCollection;
    
    public function MyPopUpManager(target:IEventDispatcher=null)
    {
      super(target);
    }
    
    public function setParent(value:DisplayObject):void
    {
      oParent = value;
      trace("MyPopUpManager » setParent » value = " + value);
    }
    
    public function showItemInfo(proxy:CardProxy):void
    {
      if (proxy == null || oParent == null)
        return;
      
      currentItemInfoProxy = proxy;
      PopUpManager.createPopUp(oParent, ItemInfo, true)
    }
  }
}